<?php

/**
 * Fansubs form base class.
 *
 * @package    form
 * @subpackage fansubs
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 8807 2008-05-06 14:12:28Z fabien $
 */
class BaseFansubsForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'              => new sfWidgetFormInputHidden(),
      'fansub'          => new sfWidgetFormInput(),
      'web'             => new sfWidgetFormInput(),
      'afiliado'        => new sfWidgetFormInput(),
      'fechainserccion' => new sfWidgetFormDate(),
      'fechaafiliacion' => new sfWidgetFormDate(),
      'idtipofansub'    => new sfWidgetFormInput(),
      'siglas'          => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'              => new sfValidatorPropelChoice(array('model' => 'Fansubs', 'column' => 'id', 'required' => false)),
      'fansub'          => new sfValidatorString(array('max_length' => 255)),
      'web'             => new sfValidatorString(array('max_length' => 255)),
      'afiliado'        => new sfValidatorInteger(),
      'fechainserccion' => new sfValidatorDate(),
      'fechaafiliacion' => new sfValidatorDate(array('required' => false)),
      'idtipofansub'    => new sfValidatorInteger(),
      'siglas'          => new sfValidatorString(array('max_length' => 10, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('fansubs[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Fansubs';
  }


}
